#pragma once

namespace AVUI
{

class IInputElement
{
public:

    virtual bool Focus() = 0;
    virtual Object* get_Object() = 0;
    virtual bool get_IsKeyboardFocusWithin() = 0;
};

class IFrameworkInputElement
{
public:
    virtual TRefCountedPtr<String> get_Name() = 0;
};

class ContentElement;
class UIElement3D;
class InputElement
{
public:
    static IInputElement* GetContainingInputElement(DependencyObject* pO) { return GetContainingInputElement(pO, false); }
    static IInputElement* GetContainingInputElement(DependencyObject* pO, bool onlyTraverse2D);
    static DependencyObject* GetContainingUIElement(DependencyObject* pO) { return GetContainingUIElement(pO, false); }
    static DependencyObject* GetContainingUIElement(DependencyObject* pO, bool onlyTraverse2D);
    static DependencyObject* GetContainingVisual(DependencyObject* pO);
    static DependencyObject* GetRootVisual(DependencyObject* pO) { return GetRootVisual(pO, true); }
    static DependencyObject* GetRootVisual(DependencyObject* pO, bool enable2DTo3DTransition);
    static bool IsContentElement(DependencyObject* pO) { return is_type<ContentElement>(pO); }
    static bool IsUIElement(DependencyObject* pO) { return is_type<UIElement>(pO); }
    static bool IsUIElement3D(DependencyObject* pO) { return is_type<UIElement3D>(pO); }
    static bool IsValid(DependencyObject* pO) { return IsUIElement(pO) || IsContentElement(pO) || IsUIElement3D(pO); }
    static bool IsValid(IInputElement* pE) { if(pE == NULL) return false; return IsValid(object_cast<DependencyObject>(pE->get_Object())); }
    static Point TranslatePoint(const Point& pt, DependencyObject* pFrom, DependencyObject* pTo) { bool translated = false; return TranslatePoint(pt,pFrom,pTo,&translated); }
    static Point TranslatePoint(const Point& pt, DependencyObject* pFrom, DependencyObject* pTo, bool* pTranslated);
};


};



